import {
    getAction,
    postAction,
    postFormData
  } from '@/api/manage'
  const gateway = '/api/gateway'
  const gateway2 = '/gateway/api'
  
  const shareRoleList = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/role/query', params) // 查询素材分享角色列表
  const editRole = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/role/createOrUpdate', params) // 创建/编辑素材分享角色
  const deleteRole = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/role/updateStatus', params) // 删除素材分享角色
  const searchList = (params) => getAction(gateway2 + '/admin/product/getSizeNos', params) // 查询搜索条件
  const searchBandList = (params) => postAction(gateway2 + '/admin/product/queryDim', params) // 查询搜索条件-波段
  const searchProduct = (params) => postAction(gateway + '/jnby-product-center/product/store/api/queryMallGoodSpu', params) // 获取微商城商品数据
  const themeShareCondition = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/condition', params) // 素材弹窗搜索条件
  const themeShareClass = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/classify/listAll', params) // 素材弹窗搜索条件-分类
  const themeList = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/listByCondition', params) // 素材弹窗 素材列表
  const themeDetail = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/detail', params) // 查询素材分享参数详情
  const brandList = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/brand/query', params) // 查询引流小程序
  const creatShare = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/shareParam/create', params) // 创建素材分享参数
  const creatPoster = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/poster/create', params) // 生成海报
  const searchSharePoster = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/poster/cache', params) // 查询缓存结果
  const productDetail = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/product/detail', params) // 查询商品详情
  const themeShareDetail = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/theme/detail', params) // 查询素材海报详情
  const downPoster = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/poster/pack', params) // 打包海报
  const detailDownPoster = (params) => postAction(gateway + '/jic-backend-pos/pos/themeShare/poster/pack/detail', params) // 素材详情打包下载
  export {
    shareRoleList,
    editRole,
    deleteRole,
    searchList,
    searchBandList,
    searchProduct,
    themeShareCondition,
    themeShareClass,
    themeList,
    themeDetail,
    brandList,
    creatShare,
    creatPoster,
    searchSharePoster,
    productDetail,
    themeShareDetail,
    downPoster,
    detailDownPoster
  }